package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/05/30 11:27
 */
@RequestMapping("header")
@Controller
public class HeaderLimitController {

    //一定要包含aaa和bbb请求头
    @RequestMapping(value = "limit",headers = {"aaa","bbb"})
    @ResponseBody
    public String headerLimit() {
        return "Header limit";
    }

    @RequestMapping(value = "consumes",consumes = "aaa/bbb")
    @ResponseBody
    public String consumes() {
        return "Content-Type value limit";
    }

    @RequestMapping(value = "produces",produces = "ccc/ddd")
    @ResponseBody
    public String produces() {
        return "Accept value limit";
    }
}
